<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

if ( ! function_exists('populate_field'))
{
	/*
	$field_type : radio, text, select, checkbox, textarea, etc...
	$field_name : field to populate
	$session_var : null if we don't use a session var with a diferent name as the field_name
	*/
	function populate_field($field_type, $field_name, $session_var)  
	{
		switch($field_type)
		{
			case 'text':
				if(set_value($field_name)) 
					echo set_value($field_name); 
				/*elseif( ($session_var != null) && ($this->session->userdata($session_var)) )	
					echo $this->session->userdata($session_var);				
				elseif ($this->session->userdata($field_name))
					echo $this->session->userdata($field_name);*/
			break;		
			
			case 'radio':
			break;
		}
	}
}